import java.io.*;
import java.util.*;
public class Main {
	String number;
	String name;
	int age;
	String sex;
	public Main(String x,String y,int z,String m)
	{
		number=x;
		name=y;
		age=z;
		sex=m;
	}
	public String toString()
	{
		return number+","+name+","+age+","+sex;
	}
	public static String getNumber()
	{
		String s="";
		try {
			BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
			s=in.readLine();
		}catch(IOException e) {System.out.println("有错误！");}
		return s;
	}
	public static void main(String[] args) {
		List <Main>link=new LinkedList<Main>();
		Main m=null;
		Object obj = null;
		link.add(new Main("01","张三",12,"男"));
		link.add(new Main("02","李四",13,"女"));
		link.add(new Main("03","王五",14,"男"));
		Iterator<Main> it=link.iterator();
		while(it.hasNext())
		{
			obj=it.next();
			System.out.println(obj);
		}
		link.add(new Main("04","赵六",15,"男"));
		String s=getNumber();
		Iterator<Main> it2=link.iterator();
		while(it2.hasNext())
		{
		    obj=it2.next();
			if(obj instanceof Main)
				m=(Main)obj;
			String n=m.number;
			if(n.equals(s))
				break;
		}
		link.remove(m);
		Iterator<Main> it1=link.iterator();
		while(it1.hasNext())
		{
			obj=it1.next();
			System.out.println(obj);
		}
	}
}